/*
** my_strcapitalize.c for my_strcapitalize in /home/nadali_t//local/piscine/Jour_06/ex_09
** 
** Made by thomas nadalie
** Login   <nadali_t@epitech.net>
** 
** Started on  Mon Oct  8 15:40:37 2012 thomas nadalie
** Last update Mon Nov 19 17:38:36 2012 thomas nadalie
*/

char		*my_strcapitalize(char *str)
{
  int		i;

  i = 0;
  while (str[i])
    {

      if ((str[i - 1] == ' ' || str[i - 1] == '\0') ||
	  (str[i - 1] < 'a' && str[i - 1] > 'Z') ||
	  (str[i - 1] < 'A' && str[i - 1] > '9') ||
	  (str[i - 1] < '0' && str[i - 1] > ' '))
	{
	  if (str[i] >= 'a' && str[i] <= 'z')
	    str[i] = str[i] - 32;
	}
      i = i + 1;
    }
  return (str);
}
